home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / ifp1s158.zip / PAGE_18.PAS < prev    next >
Pascal/Delphi Source File  |  1993-08-27  |  53KB  |  1,997 lines

  1. unit page_18;
  2.  
  3. interface
  4.  
  5. uses crt, dos, ifpextrn, ifpglobl, ifpcomon;
  6.  
  7. procedure page18;
  8.  
  9. implementation
  10.  
  11. procedure page18;
  12.  
  13. var
  14.   i : 1..63;
  15.   s: string;
  16.   xlong: longint;
  17.   SaveX, Savey: byte;
  18.  
  19.  
  20.  
  21.   procedure Shells;
  22.     var
  23.       xword1: word;
  24.       regs: registers;
  25.  
  26.     begin
  27.     Caption1('----Shells and Shell enhancers----');
  28.     Writeln;
  29.     Caption2('JP Software 4DOS');
  30.     with regs do
  31.       begin
  32.       AX:=$D44D;
  33.       BX:=0;
  34.       CX:=0;
  35.       DX:=0;
  36.       Intr($2F, regs);
  37.       if AX <> $44DD then
  38.         Writeln('no')
  39.       else
  40.         begin
  41.         Writeln('yes');
  42.         Caption3('version');
  43.         xword1:=BH;
  44.         Write(BL, decimal);
  45.         ZeroPad(xword1);
  46.         Caption3('shell no.');
  47.         Write(DL);
  48.         Caption3('PSP segment');
  49.         Writeln(Hex(CX, 4))
  50.         end;
  51.       end;
  52.     Pause3(-1);
  53.     if endit then
  54.       Exit;
  55.     Caption2('JP Software KSTACK.COM');
  56.     with regs do
  57.       begin
  58.       AX:=$D44F;
  59.       BX:=0;
  60.       CX:=0;
  61.       DX:=0;
  62.       Intr($2F, regs);
  63.       yesorno(AX = $44DD);
  64.       end;
  65.     Pause3(-2);
  66.     if endit then
  67.       Exit;
  68.     Caption2('Norton NDOS');
  69.     with regs do
  70.       begin
  71.       AX:=$E44D;
  72.       BX:=0;
  73.       CX:=0;
  74.       DX:=0;
  75.       Intr($2F, regs);
  76.       if AX <> $44EE then
  77.         Writeln('no')
  78.       else
  79.         begin
  80.         Writeln('yes');
  81.         Caption3('version');
  82.         xword1:=BH;
  83.         Write(BL, decimal);
  84.         ZeroPad(xword1);
  85.         Caption3('shell no.');
  86.         Write(DL);
  87.         Caption3('PSP segment');
  88.         Writeln(Hex(CX, 4))
  89.         end;
  90.       end;
  91.     Pause3(-1);
  92.     if endit then
  93.       Exit;
  94.     Caption2('WildUnix');
  95.     with regs do
  96.       begin
  97.       AH:=$4E;
  98.       DS:=0;
  99.       DX:=0;
  100.       MsDos(regs);
  101.       yesorno(AH = $99);
  102.       end;
  103.     Pause3(-1);
  104.     if endit then
  105.       Exit;
  106.     Caption2('Anarkey');
  107.     with regs do
  108.       begin
  109.       AX:=$E300;
  110.       Intr($2F, regs);
  111.       case AL of
  112.         $00: Writeln('no');
  113.         $FE: Writeln('yes; but suspended');
  114.         $FF: Writeln('yes; and active');
  115.       else
  116.         Writeln('???')
  117.       end
  118.       end;
  119.     end; {Shells}
  120.  
  121.   procedure DosExtenders;
  122.     var
  123.       xbool1: boolean;
  124.       xbyte: byte;
  125.  
  126.     begin
  127.     Pause3(-1);
  128.     if endit then
  129.       Exit;
  130.     Caption1('----DOS Extenders----');
  131.     Writeln;
  132.     Caption2('DOS/16M');
  133.     with regs do
  134.       begin
  135.       AX:=$BF02;
  136.       DX:=0;
  137.       Intr($15, regs);
  138.       yesorno(DX <> 0);
  139.       end;
  140.     Pause3(-4);
  141.     if endit then
  142.       Exit;
  143.     Caption2('Phar Lap DOS Extender');
  144.     xbool1:=false;
  145.     xbyte:=1;
  146.     with regs do
  147.       repeat
  148.         AX:=$ED00;
  149.         BL:=xbyte;
  150.         Intr($2F, regs);
  151.         if (AL = $FF) and (SI = $5048 {PH}) and (DI = $4152 {AR}) then
  152.           begin
  153.           xbool1:=true;
  154.           Write('yes');
  155.           Caption3('type');
  156.           case xbyte of
  157.             1: Write('286dosx v1.3+ SDK');
  158.             2: Write('286dosx v1.3+ RTK');
  159.             3: Write('386dosx v4.0+ SDK');
  160.             4: Write('386dosx v4.0+ RTK')
  161.           end;
  162.           Caption3('version');
  163.           Write(CH, decimal);
  164.           ZeroPad(CL);
  165.           end;
  166.         Inc(xbyte);
  167.       until xbyte > 4;
  168.     if not xbool1 then
  169.       Writeln('no');
  170.     end; {DosExtenders}
  171.  
  172.   procedure MemUtils;
  173.     type
  174.       T386maxbuf = record
  175.                      version: byte;
  176.                      signature: array[1..6] of char;
  177.                      verstr: array[1..4] of char;
  178.                      lowseg: word;
  179.                      unkw1: word;
  180.                      unkw2: word;
  181.                      flags1: word;
  182.                      unk1: array [1..16] of byte;
  183.                      int15port: word;
  184.                      int67port: word;
  185.                      unkw3: word;
  186.                      unkw4: word;
  187.                      unkd1: longint;
  188.                      unkd2: longint;
  189.                      sysconfig: word;
  190.                      unk2: array [1..8] of byte;
  191.                      flags2: word;
  192.                      flags3: word;
  193.                      flags4: word;
  194.                      unkw5: word;
  195.                      extfree: word;
  196.                      unkd3: longint;
  197.                      unkw6: word;
  198.                      unkd4: longint;
  199.                      flags5: word;
  200.                      oldint21ofs: word;
  201.                      oldint21seg: word;
  202.                      emsofs: word;
  203.                      emsseg: word;
  204.                      extra: byte;
  205.                    end;
  206.  
  207.     var
  208.       V386maxbuf: T386maxbuf;
  209.       QEMMid: byte;
  210.       xword: word;
  211.       xbyte: byte;
  212.       xlong: longint;
  213.       foundit: boolean;
  214.  
  215.     begin
  216.     Pause3(-3);
  217.     if endit then
  218.       Exit;
  219.     Caption1('----Memory Managers and Memory utilities----');
  220.     Writeln;
  221.     Caption2('QEMM');
  222.     with regs do
  223.       begin
  224.       QEMMid:=$D2;
  225.       foundit:=false;
  226.       repeat
  227.         AH:=QEMMId;
  228.         AL:=0;
  229.         BX:=$5144; {'QD'}
  230.         CX:=$4D45; {'ME'}
  231.         DX:=$4D30; {'M0'}
  232.         Intr($2F, regs);
  233.         if (AL = $FF) and (BX = $4D45) and (CX = $4D44) and (DX = $5652) then
  234.           foundit:=true
  235.         else
  236.           begin
  237.           if QEMMid < $FF then
  238.             Inc(QEMMid)
  239.           else
  240.             QEMMid:=$C0;
  241.           end;
  242.       until foundit or (QEMMid = $D2);
  243.       if not foundit then
  244.         Writeln('no')
  245.       else
  246.         begin
  247.         AH:=QEMMid;
  248.         AL:=1;
  249.         BX:=$5145; {'QE'}
  250.         CX:=$4D4D; {'MM'}
  251.         DX:=$3432; {'42'}
  252.         Intr($2F, regs);
  253.         if BX = $4F4B {'OK'} then
  254.           begin
  255.           Write('yes');
  256.           Caption3('API entry');
  257.           SegOfs(ES, DI);
  258.           xlong:=longint(ES) shl 16 + DI;
  259.           Caption3('version');
  260.           AH:=3;
  261.           longcall(xlong, regs);
  262.           if not nocarry(regs) then
  263.             Write('error')
  264.           else
  265.             Write(unBCD(BH), decimal, AddZero(unBCD(BL)));
  266.           xword:=BX;
  267.           Caption3('status');
  268.           AH:=0;
  269.           longcall(xlong, regs);
  270.           if not nocarry(regs) then
  271.             Write('error')
  272.           else
  273.             if AL and 1 = 1 then
  274.               Write('OFF')
  275.             else
  276.               if AL and 2 = 2 then
  277.                  Write('Auto')
  278.               else
  279.                 Write('ON');
  280.           Writeln;
  281.           Caption3('High RAM');
  282.           AH:=$12;
  283.           longcall(xlong, regs);
  284.           if not nocarry(regs) then
  285.             Write('error')
  286.           else
  287.             begin
  288.             yesorno2(BX <> 0);
  289.             if BX <> 0 then
  290.               begin
  291.               Caption3('first MCB at');
  292.               Write(Hex(BX, 4));
  293.               end;
  294.             end;
  295.           if Hi(xword) >= 6 then
  296.             begin
  297.             Caption3('Stealth');
  298.             AX:=$1E00;
  299.             longcall(xlong, regs);
  300.             if not nocarry(regs) then
  301.               Write('error')
  302.             else
  303.               begin
  304.               case CL of
  305.                   0: Write('OFF');
  306.                 $46: Write('Frame');
  307.                 $4D: Write('Map')
  308.               else
  309.                 Write('????');
  310.               end;
  311.               if (CL = $46) or (CL = $4D) then
  312.                 begin
  313.                 Caption3('Stealthed ROMs');
  314.                 AX:=$1E01;
  315.                 longcall(xlong, regs);
  316.                 if not nocarry(regs) then
  317.                   Write('error')
  318.                 else
  319.                   Write(BX);
  320.                 end;
  321.               end;
  322.             end;
  323.           Writeln;
  324.           end
  325.         else
  326.           Writeln('no')
  327.         end;
  328.       Pause3(-1);
  329.       if endit then
  330.         Exit;
  331.       Caption2('Quarterdeck Manifest (memory resident)');
  332.       if not foundit then
  333.         Writeln('no')
  334.       else
  335.         begin
  336.         AH:=QEMMid;
  337.         AL:=1;
  338.         BX:=$4D41; {'MA'}
  339.         CX:=$4E49; {'NI'}
  340.         DX:=$4645; {'FE'}
  341.         Intr($2F, regs);
  342.         yesorno(BX = $5354 {'ST'